import axios from '@/libs/api.request'

export class PolicySupportApi {
  // 获取单个政策支持文件
  static getPolicySupport (params) {
    return axios.request({
      url: '/PolicySupport/GetPolicySupport',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取政策支持列表
  static getPolicySupportList (params) {
    return axios.request({
      url: '/PolicySupport/GetPolicySupportList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 文件上传
  static fileUpload (params) {
    return axios.request({
      url: '/PolicySupport/FileUpload',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 删除政策支持文件
  static deletePolicySupport (params) {
    return axios.request({
      url: '/PolicySupport/DeletePolicySupport',
      method: 'delete',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 新建文件夹
  static createDir (params) {
    return axios.request({
      url: '/PolicySupport/CreateDir',
      method: 'post',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 下载文件
  static downloadFile (params) {
    return axios.request({
      url: '/PolicySupport/DownloadFile',
      method: 'post',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 重命名
  static reName (params) {
    return axios.request({
      url: '/PolicySupport/ReName',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取组织架构
  static getOrganizationUnitTree (params) {
    return axios.request({
      url: '/PolicySupport/GetOrganizationUnitTree',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 文件共享
  static fileShare (params) {
    return axios.request({
      url: '/PolicySupport/FileShare',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 取消共享
  static unFileShare (params) {
    return axios.request({
      url: '/PolicySupport/UnFileShare',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 添加完成信息
  static AddResult (params) {
    return axios.request({
      url: '/ProductDelivery/AddResult',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }
}
